// 这里有边框线，但是不用考虑，可以用css的after做
// 只要先考虑局部再细节
<template>
    <panel title="理财精选" class="panel">
        <section class="content">
            <dl class="item" v-for="item in items" :key="item.title">
                <dt>{{item.title}}<span class="red">{{item.sub}}</span></dt>
                <dd>{{item.rate}}</dd>
                <dd>{{item.text}}</dd>
            </dl>
        </section>
    </panel>
</template>
<script>
import Panel from "@/components/panel"
export default {
    name: 'Morrey',
    components: {
        Panel
    },
    data() {
        return {
            items: [
                {
                    title: "长乐盈",
                    sub: "180天可质押",
                    rate: "5.80%",
                    text: "近1年历史年化投资回报率"
                },{
                    title: "京智0号",
                    sub: "大数据赋能",
                    rate: "6.00%",
                    text: "近1月历史年化投资回报率"
                },{
                    title: "建信养老飞益鑫",
                    sub: "1000起投",
                    rate: "4.57%",
                    text: "近7日年化收益"
                },{
                    title: "小白基金",
                    sub: "超短期",
                    rate: "4.50%",
                    text: "7日年化收益率"
                }
            ]
        }
    }
}
</script>
<style lang="scss" scoped>
     @import '~assets/scss/element.scss';
    .panel{
        @include panel;
        .content{
            @include flex(row);
            justify-content: space-around; // 对齐
            box-sizing: border-box;
            &:after{
                    content:' ';
                    display: block;
                    width: 100%;
                    height: 0;
                    box-sizing: border-box;
                    border-bottom: 1px solid #eee;
                    position: relative;
                    top: -2.08rem;
                }
            .item{
                position: relative;
                width: 50%;
                padding: .34rem .16rem;
                box-sizing: border-box;
                &:after{
                    content:' ';
                    width: 1px;
                    height: 100%;
                    display: block;
                    position: absolute;
                    top: 50%;
                    right: 0;
                    margin-top: -28%;
                    border-right: 1px solid #eee;
                }
                &:nth-child(2n){
                    &:after{
                        display: none;
                    }
                }
                dt{
                    font-size: .3rem;
                    line-height: .42rem;
                    color: #333;
                    span{
                        font-size: .22rem;
                        color: #ff5155;
                        border: 1px solid #ff5155;
                        padding: 0 .08rem;
                        vertical-align: 1px;
                        margin-left: 2px;
                    }
                }
                dd{
                    &:nth-child(2){
                        font-weight: 700;
                        font-size: .44rem;
                        height: .58rem;
                        line-height: .58rem;
                        color: #ff5155;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                    &:nth-child(3){
                        font-size: .24rem;
                        height: .34rem;
                        line-height: .34rem;
                        color: #999;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                }
            }
        }
    }
</style>


